{extend name="public:default" /}

<!-- 搜索栏 -->
{block name="inputBtn"}
    
    <div class="layui-inline marSelect">
        <div class="layui-input-inline">
            <select name="agency_log_is_show">
                <option value="">是否显示</option>
                <option value="1">是</option>
                <option value="0">否</option>
            </select>
        </div>
    </div>
    
    <br>

    <div class="layui-inline">
        <fieldset class="label_title">
            <legend>名称</legend>
            <input type="text" name="agency_log_nickname" placeholder="点此输入" autocomplete="off" class="layui-input">
        </fieldset>
    </div>

    <div class="layui-inline">
        <fieldset class="label_title">
            <legend>权限名称</legend>
            <input type="text" name="agency_log_rank_name" placeholder="点此输入" autocomplete="off" class="layui-input">
        </fieldset>
    </div>

    <div class="layui-inline">
        <fieldset class="label_title">
            <legend>IP段</legend>
            <input type="text" name="agency_log_ip" placeholder="点此输入" autocomplete="off" class="layui-input">
        </fieldset>
    </div>

    <div class="layui-inline">
        <fieldset class="label_title">
            <legend>操作事件</legend>
            <input type="text" name="agency_log_event" placeholder="点此输入" autocomplete="off" class="layui-input">
        </fieldset>
    </div>

    <div class="layui-inline">
        <fieldset class="label_title">
            <legend>操作内容</legend>
            <input type="text" name="agency_log_content" placeholder="点此输入" autocomplete="off" class="layui-input">
        </fieldset>
    </div>

    <div class="layui-inline">
        <fieldset class="label_title">
            <legend>请选择日期</legend>
            <input type="text" name="agency_log_times" placeholder="点此选择" class="layui-input" id="test-laydate-range-datetime" lay-key="1" readonly>
        </fieldset>
    </div>
    
{/block}
<!-- js 执行方法 -->
{block name="script"}
<script>
    var editList = window.location.pathname // 列表链接
    var editAdd = editList + 'Add' // 添加链接
    var editUp = editList + 'Up' // 修改链接
    var editDel = editList + 'Del' // 删除链接

    views.setUrl(editAdd,editDel,editUp).cols({
        url: editList,
        page: true,
        cols: [
            {type: 'checkbox', fixed: 'left'}
            
            ,{field:'id', title:'ID', align:'center'}
            ,{field:'agency_log_p_id', title:'代理ID', align:'center'}
            ,{field:'agency_log_p_nickname', title:'代理昵称',align:'center'}
            ,{field:'agency_log_nickname', title:'名称', align:'center'}
            ,{field:'agency_log_rank_name', title:'权限名称', align:'center'}
            ,{field:'agency_log_ip', title:'IP段', align:'center'}
            ,{field:'agency_log_event', title:'操作事件', align:'center'}
            ,{field:'agency_log_content', title:'操作内容', align:'center'}
            ,{field:'agency_log_is_show', title:'是否显示', align:'center'
                ,templet:function(d)
                {
                    return d.agency_log_is_show ? '是' : '否';
                }            
            }
            ,{field:'agency_log_times', title:'添加时间', align:'center', align:'center', templet:function(d){ return d.agency_log_times ? layui.util.toDateString(d.agency_log_times * 1000) : '' ; }}
        ]

    }).toolbar(function(obj,data,table){
        // 头工具栏事件

    }).tool(function(obj,table){
        //监听行工具事件
    }).get();


    
</script>
{/block}
  